/**
@author		Jong Min, Lee
@date		  01/21/2014
@breif		viewer property

copyright(c) Tae Young Soft. All right reserved. 2014
*/
#pragma once

#include "Taurus_Xml/XmlFunc.h"

#define VIEWER_PROPERTY_NAME  _T("viewer_property")

/**
@brief interface for viewer property
*/
class IViewerProperty
{
public:
  /**
  @brief		get property by xpath
  @param		pszXPath pointer to xpath
  @return		pointer to property xml node if found, NULL if not
  */
  virtual MSXML2::IXMLDOMNodePtr getProperty(const TCHAR* pszXPath) = 0;

  /**
  @brief		update a property
  @param		pszParentName pointer to parent property name
  @param    pszName pointer to property name to be updated
  @param    pPropertyNode pointer to property node vluae
  @return		ERROR_SUCCESS upon success, an error codeo otherwise
  */
  virtual DWORD updateProperty(const TCHAR* pszParentName,
                               const TCHAR* pszName,
                               MSXML2::IXMLDOMNodePtr pPropertyNode) = 0;

  /**
  @brief		commit current viewer property
  @return		ERROR_SUCCESS upon success, an error codeo otherwise
  */
  virtual DWORD commit() = 0;

  /**
  @brief		rollback viewer property were updated previously
  @return		ERROR_SUCCESS upon success, an error codeo otherwise
  */
  virtual DWORD rollback() = 0;
};
